package develop.game.exitfast;

import java.util.Random;

public class function_execute {
	public int doorPositionX(int width, int adjustment) {
		Random r = new Random();
		int rDoorX = (r.nextInt(width-adjustment+1) + 20);
		while (rDoorX < 50 || rDoorX > width - 100) {
			rDoorX = (r.nextInt(width-adjustment+1) + 20);
		}
		return rDoorX;
	}

	public int doorPositionY(int height, int adjustment) {
		Random r = new Random();
		int rDoorY = (r.nextInt(height-adjustment+1) + 20);
		while (rDoorY < 50 || rDoorY > height - 100) {
			rDoorY = (r.nextInt(height-adjustment+1) + 20);
		}
		return rDoorY;
	}
}
